import React, { Component } from "react";
import "./Pagination.less";
class Pagination extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }
  render() {
    let currentIndex = this.props.myindex;
    let dots = this.props.dots;
    console.log(currentIndex);
    console.log(dots);

    let arr = new Array(dots).fill(1);
    console.log(arr);
    return (
      <div className="swiper-pagination">
        <ul>
          {arr.map((item, index) => {
            return (
              <li
                key={index}
                className={currentIndex === index ? "selected" : ""}
              ></li>
            );
          })}
        </ul>
      </div>
    );
  }
}

export default Pagination;
